package com.hrzyit.whistle.user.injection.component

import com.hrzyit.base.injection.PreComponentScope
import com.hrzyit.base.injection.component.ActivityComponent
import com.hrzyit.whistle.user.injection.module.UserModule
import com.hrzyit.whistle.user.ui.activity.ForgetPwdActivity
import com.hrzyit.whistle.user.ui.activity.LoginActivity
import com.hrzyit.whistle.user.ui.activity.ResetPwdActivity
import dagger.Component

/**
 * 用户模块 Component，用来管理模块下使用 Dagger2 依赖注入的Activity
 * @author YangWei
 * @date 2019/3/22
 */
@PreComponentScope
@Component(
    dependencies = [ActivityComponent::class],
    modules = [UserModule::class]
)
interface UserComponent {

    /**
     * 依赖注入: 登录界面
     */
    fun inject(activity: LoginActivity)

    /**
     * 依赖注入: 忘记密码界面
     */
    fun inject(activity: ForgetPwdActivity)

    /**
     * 依赖注入：重置密码页面
     */
    fun inject(activity: ResetPwdActivity)
}